package com.example.campuslink.commen.db.school

import androidx.room.Dao
import androidx.room.Insert
import androidx.room.Query
import androidx.room.Update

@Dao
interface SchoolInfoDao {
    @Insert
    fun insertSchoolInfo(schoolInfoTable: SchoolInfoTable)
    @Query("SELECT * FROM school_info_table WHERE schoolName = :schoolName")
    fun getSchoolInfoBySchoolName(schoolName: String): SchoolInfoTable
    @Query("SELECT * FROM school_info_table")
    fun getAllSchoolInfo(): List<SchoolInfoTable>
    @Query("SELECT * FROM school_info_table WHERE province = :province ")
    fun getSchoolInfoByProvince(province: String): List<SchoolInfoTable>
    @Update
    fun updateSchoolInfo(schoolInfoTable: SchoolInfoTable)
    @Query("delete from school_info_table where id=:id")
    fun deleteSchoolInfo(id: Int)
}